function getAllLink() {
	document.getElementById('footer').innerHTML="omgwtfbbq";
	
	if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	} else {
		// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	xmlhttp.open("GET","database1.xml",false);
	xmlhttp.send(null);
	xmlDoc=xmlhttp.responseXML;
	var x=xmlDoc.getElementsByTagName("PAGE");
	
	var output = "<a href=\""+ getAt("ORIGINAL",0) + "\" class=\"mb\" id=\"com0\" title=\"" + getAt("TITLE",0) + "\">" +
			"Start me" +
			"</a>" +
			"\n" +
			"<div class=\"hid com0\">" +
			"\n" +
			getAt("COMMENTS",0) +
			"\n" +
			"</div>";
			
	//output = getMedia(0);

  for(i=1;i<=(x.length-1);i++){
	output = output + getLink(i) +
			"\n" +
			"<div class=\"hid com" + i + "\" >" +
			"\n" +
			getAt("COMMENTS", i) +
			"\n" +
			"</div>";
  }

	document.getElementById('footer').innerHTML=output;
	new MultiBox('mb', {descClassName:'hid', useOverlay: true});

  
}

function getLink(x){
	var type = getAt("TYPE", x);
	var typeOutput = "";
	switch (type) {
		case 'mp3':
			typeOutput = "<a href=\"" + getAt("ORIGINAL",x) +
			"\"rel=\"type:" + getAt("TYPE", x) + "\" class=\"mb\" id=\"com" + x + "\" title=\"" + getAt("TITLE",x) + "\">" +
			"</a>";
			break;
		case 'jpg':
		case 'gif':
		case 'png':
			typeOutput = "<a href=\"" + getAt("ORIGINAL",x) +
			"\"rel=\"type:" + getAt("TYPE", x) + "\" class=\"mb\" id=\"com" + x + "\" title=\"" + getAt("TITLE",x) + "\">" +
			"</a>";
			break;
		case 'swf':
			typeOutput = "<a href=\"" + getAt("ORIGINAL",x) +
			"\"rel=\"type:" + getAt("TYPE", x) + "\" class=\"mb\" id=\"com" + x + "\" title=\"" + getAt("TITLE",x) + "\">" +
			"</a>";
			break;
		case 'flv':
			typeOutput = "<a href=\"" + getAt("ORIGINAL",x) +
			"\"rel=\"type:" + getAt("TYPE", x) + "\" class=\"mb\" id=\"com" + x + "\" title=\"" + getAt("TITLE",x) + "\">" +
			"</a>";
			break;				
		default:
			typeOutput = "<a href=\"" + getAt("ORIGINAL",x) +
			" class=\"mb\" id=\"com" + x + "\" title=\"" + getAt("TITLE",x) + "\">" +
			"</a>";
	}
	return typeOutput;
}